package com.aoip.telemetry.telemetry.quartz.task.datamerge.mapper;

import com.aoip.telemetry.telemetry.entity.common.QuerySourceDataEntity;
import com.aoip.telemetry.telemetry.entity.common.TableDataEntity;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @author chenbai
 * @version 1.0
 * @date 2022/10/18 12:46
 */
@Mapper
@DS("snMonitorData")
public interface DataMergeTaskMapper {

    /**
     * 查询元数据
     * @param entity 数据源表实体
     * @return java.util.List
     * @author chenbai
     * @date 2022/10/22
     **/
    List<Map<String, Object>> getDataByTable(QuerySourceDataEntity entity);

    /**
     * 业务数据持久化到MySQL数据，一个报文中的多条数据，批量新增
     * @param tableDataEntity 数据源表实体
     * @author chenbai
     * @date 2021/10/5
     **/
    void mysqlSaveSingle(TableDataEntity tableDataEntity);
}
